package customer.zspt.cn.customer.Adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import customer.zspt.cn.customer.R;
import customer.zspt.cn.customer.bean.OrderProLsDdao;

//聊天工单的列表适配器
public class OrderProLsAdapter extends BaseAdapter {
    private List<OrderProLsDdao.OrderProLs> mData;
    private Context mContext;
    
    public OrderProLsAdapter(List<OrderProLsDdao.OrderProLs> data,Context context){
        this.mData = data;
        this.mContext = context;
    }
    @Override
    public int getCount() {
        return mData.size();
    }

    @Override
    public Object getItem(int position) {
        return mData.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        TextView textView = new TextView(mContext);
        textView.setPadding(15,10,0,10);
        textView.setTextColor(mContext.getResources().getColor(R.color.black));
        textView.setTextSize(18);
        textView.setText(mData.get(position).orderpropTitle);
        return textView;
    }
}
